----------------------------------------------------------------------------------
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/figure1.log
  log type:  text
 opened on:   3 Dec 2023, 18:08:47

. 
. version 16      

. 
. use "$data/ctctaxsim_kid123mar12.dta", clear

. gen totctc=v22+v23

. 
. gen ctc2021=totctc+depx*1000

. replace ctc2021=3000*depx if earnings<50000 
(14,213 real changes made)

. replace ctc2021=max(ctc2021-0.05*(earnings-75000),2000*depx) if earnings>=75000 
> & mstat==1
(95,142 real changes made)

. replace ctc2021=max(0,2000*depx-0.05*(earnings-200000)) if earnings>=200000 & ms
> tat==1
(73,710 real changes made)

. 
. replace ctc2021=max(ctc2021-0.05*(earnings-150000),2000*depx) if earnings>=15000
> 0 & mstat==2
(82,283 real changes made)

. replace ctc2021=max(0,2000*depx-0.05*(earnings-400000)) if earnings>=400000 & ms
> tat==2
(39,426 real changes made)

. 
. replace earnings=earnings/1000
(215,988 real changes made)

. keep if earnings<550
(27,420 observations deleted)

. sort earnings

. replace totctc=totctc/1000
(86,916 real changes made)

. replace ctc2021=ctc2021/1000
(130,292 real changes made)

. 
. twoway line totctc earnings if year==2017 & depx==1 & mstat==1, pstyle(p1) || li
> ne totctc earnings if year==2017 & depx==1 & mstat==2, lp(-) pstyle(p1) || line 
> totctc earnings if year==2017 & depx==2 & mstat==1, pstyle(p2)  || line totctc e
> arnings if year==2017 & depx==2 & mstat==2, lp(-) pstyle(p2) || line totctc earn
> ings if year==2017 & depx==3 & mstat==1, pstyle(p3)  || line totctc earnings if 
> year==2017 & depx==3 & mstat==2, lp(-) pstyle(p3) graphregion(color(white)) bgco
> lor(white) ylabel(0(3)9) leg(order(1 "Single" 2 "Married") c(1) pos(1) ring(0)) 
> ytitle("CTC Benefits ($1000s)") xtitle("Earnings ($1000s)") text(4 50 "3 Kids" ,
>  j(left) size(medsmall)) text(.00 50 "1 Kid" , j(left) size(medsmall)) text(2.00
>  50 "2 Kids" , j(left) size(medsmall)) xlabel(0(100)500) text(10 250 "{bf:Panel 
> A: 2017 CTC}" , box fc(white) margin(small) j(left) size(medsmall))

. graph save "$output/ctc2017.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/ctc2017.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/ctc2017.gph saved

. 
. twoway line totctc earnings if year==2018 & depx==1 & mstat==1, pstyle(p1) || li
> ne totctc earnings if year==2018 & depx==1 & mstat==2, lp(-) pstyle(p1) || line 
> totctc earnings if year==2018 & depx==2 & mstat==1, pstyle(p2)  || line totctc e
> arnings if year==2018 & depx==2 & mstat==2, lp(-) pstyle(p2) || line totctc earn
> ings if year==2018 & depx==3 & mstat==1, pstyle(p3)  || line totctc earnings if 
> year==2018 & depx==3 & mstat==2, lp(-) pstyle(p3) graphregion(color(white)) bgco
> lor(white) ylabel(0(3)9) leg(off) ytitle("CTC Benefits ($1000s)") xtitle("Earnin
> gs ($1000s)") text(7.00 120 "3 Kids" , j(left) size(medsmall)) text(1.00 120 "1 
> Kid" , j(left) size(medsmall)) text(3.00 120 "2 Kids" , j(left) size(medsmall)) 
> xlabel(0(100)500) text(10 250 "{bf:Panel B: 2020 CTC}" , box fc(white) margin(sm
> all) j(left) size(medsmall))

. graph save "$output/ctc2018.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/ctc2018.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/ctc2018.gph saved

. 
. 
. twoway line ctc2021 earnings if year==2018 & depx==1 & mstat==1, pstyle(p1) || l
> ine ctc2021 earnings if year==2018 & depx==1 & mstat==2, lp(-) pstyle(p1) || lin
> e ctc2021 earnings if year==2018 & depx==2 & mstat==1, pstyle(p2)  || line ctc20
> 21 earnings if year==2018 & depx==2 & mstat==2, lp(-) pstyle(p2) || line ctc2021
>  earnings if year==2018 & depx==3 & mstat==1, pstyle(p3)  || line ctc2021 earnin
> gs if year==2018 & depx==3 & mstat==2, lp(-) pstyle(p3) graphregion(color(white)
> ) bgcolor(white) ylabel(0(3)9) leg(off) ytitle("CTC Benefits ($1000s)") xtitle("
> Earnings ($1000s)") text(8.00 40 "3 Kids" , j(left) size(medsmall)) text(2.00 40
>  "1 Kid" , j(left) size(medsmall)) text(5.00 40 "2 Kids" , j(left) size(medsmall
> )) xlabel(0(100)500) text(10 250 "{bf:Panel C: 2021 CTC}" , box fc(white) margin
> (small)  j(left) size(medsmall))

. graph save "$output/ctc2021.gph", replace
(file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/ctc2021.gph not found)
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication files/out
> put/ctc2021.gph saved

. 
. graph combine "$output/ctc2017.gph" "$output/ctc2018.gph" "$output/ctc2021.gph" 
> ,graphregion(color(white)) c(1)

. graph export "$output/figure1.png", replace
file G:\My Drive\Research\CTC expansion\submission\ntj\stata replication
    files/output/figure1.png saved as PNG format

. 
. erase "$output/ctc2017.gph" 

. erase "$output/ctc2018.gph" 

. erase "$output/ctc2021.gph"

. 
. log close
      name:  <unnamed>
       log:  G:\My Drive\Research\CTC expansion\submission\ntj\stata replication f
> iles/output/figure1.log
  log type:  text
 closed on:   3 Dec 2023, 18:08:53
----------------------------------------------------------------------------------
